﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SystemDoc_codemanage_view.aspx.cs" Inherits="Ccit.OA.SystemDoc.SystemDoc_codemanage_view" %>
<%@ Register assembly="DevExpress.Web.ASPxGridView.v8.1" namespace="DevExpress.Web.ASPxGridView" tagprefix="dxwgv" %>
<%@ Register assembly="DevExpress.Web.ASPxEditors.v8.1" namespace="DevExpress.Web.ASPxEditors" tagprefix="dxe" %>
<%@ Register TagPrefix="ccit" Namespace="Ccit.ServerControls" Assembly="Ccit.ServerControls.ActionForm" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
     <script language="javascript" src="../script/StringClass_Ext.js" type="text/javascript"></script>
        <script language="javascript" src="../script/jquery.js" type="text/javascript"></script>
        <script language="javascript" src="../script/jcontrol.js" type="text/javascript"></script>
        <script language="javascript" src="../script/jsonlib.js" type="text/javascript"></script>
        <script language="javascript" src="../script/jwindow.js" type="text/javascript"></script>
        <script language="javascript" src="../script/jbase64.js" type="text/javascript"></script>
        <script type="text/javascript">
            function doDel(vNumber)
            {  
                if(vNumber!="")
                {                     
                      if(confirm("是否确定要删除当前选定的信息?")) 
                                 PageMethods.DoOperate(vNumber,ClientCallBack);   
                }
                else
                {
                    alert("尚未有您要删除的数据!")
                }
            }
            function ClientCallBack(vResult)
            {
                eval("var resultObj=" + vResult);
                 if(resultObj.resultSign!="-999")
                 {
                    __doPostBack("lnbQuery","");
                    alert("操作成功!"); 
                    return true;
                 }
                 else
                 {
                    alert("服务器忙,请稍候再从新操作!"); 
                    return false;
                 }
            }
            function initializeAddNew(vNumber)
            {
                document.getElementById("_hidsQuery").value = vNumber;
                 __doPostBack("lnbQuery","");
            }
             //复选框选择
             var objState ; 
            function doDataGridItemSel( obj )
            {
              if ( objState != null )
              {
                 objState.style.color = "";
                 objState.style.backgroundColor = "";
              } 
              obj.style.color = "#fffeee";
              obj.style.backgroundColor = "#a0a0a0";        
              objState = obj;		                       
            }	
            function OnGridSelectionChanged(){           
                dgMain.GetSelectedFieldValues("Number",OnGridSelectionComplete);
            }
            
            function OnGridSelectionComplete(values){
                document.getElementById("_hidCodeMId").value=values;            
            }
        </script>
</head>
<body>
    <ccit:ActionForm id="form1" runat="server">
    <input type="hidden" id="_hidCodeMId" runat="server" />
    <input type="hidden" id="_hidCodeID" runat="server" />
    <input type="hidden" id="_hidsQuery" runat ="server" />
    <asp:ScriptManager ID="ScriptManager1" EnablePageMethods="true" runat="server"></asp:ScriptManager>    
    
   <asp:LinkButton ID="lnbQuery"  style="display:none" runat="server" 
                                onclick="lnbQuery_Click" ></asp:LinkButton>
   <table cellpadding="0" cellspacing="0" width="98%" align="center">
                                <tr>
                                    <td colspan="3" width="100%">
                                      <dxwgv:ASPxGridView ID="dgMain" runat="server"
                                AutoGenerateColumns="False" Width="100%" KeyFieldName="Number" onhtmlrowcreated="dgMain_HtmlRowCreated" 
                                             >
                                            <SettingsPager AlwaysShowPager="True" PageSize="15">
                                                <FirstPageButton Visible="True">
                                                </FirstPageButton>
                                                <LastPageButton Visible="True">
                                                </LastPageButton>
                                            </SettingsPager>
                                             <Styles>
                                                <Row CssClass=""></Row>
                                                <AlternatingRow  CssClass="" Enabled="true"/>
                                                <SelectedRow  CssClass=""></SelectedRow>                
                                            </Styles>  
                                            <Columns>
                                                 <dxwgv:GridViewCommandColumn ShowSelectCheckbox="True" VisibleIndex="0" Width="2%">
                                                    <HeaderTemplate>
                                                        <input type="checkbox" id="chbCheck" runat="server" onclick="dgMain.SelectAllRowsOnPage(this.checked);"
                                                            style="vertical-align: middle;" title="Select/Unselect all rows on the page"></input>
                                                    </HeaderTemplate>
                                                    <HeaderStyle Paddings-PaddingTop="1" Paddings-PaddingBottom="1" HorizontalAlign="Center">
                                                        <Paddings PaddingTop="1px" PaddingBottom="1px"></Paddings>
                                                    </HeaderStyle>
                                                </dxwgv:GridViewCommandColumn>
                                                <dxwgv:GridViewDataTextColumn Caption="编号" VisibleIndex="1" width="12%" FieldName="Number">
                                                 <HeaderStyle HorizontalAlign="Center" />
                                                 <CellStyle HorizontalAlign="left"></CellStyle>
                                                </dxwgv:GridViewDataTextColumn>
                                                <dxwgv:GridViewDataTextColumn Caption="类别" VisibleIndex="2" width="12%" FieldName="TypeName">
                                                  <HeaderStyle HorizontalAlign="Center" />
                                                  <CellStyle HorizontalAlign="Center"></CellStyle>
                                                </dxwgv:GridViewDataTextColumn>
                                                 <dxwgv:GridViewDataTextColumn Caption="规则名称" VisibleIndex="3" width="12%" FieldName="CodeName">
                                                  <HeaderStyle HorizontalAlign="Center" />
                                                  <CellStyle HorizontalAlign="Center"></CellStyle>
                                                </dxwgv:GridViewDataTextColumn>
                                                 <dxwgv:GridViewDataTextColumn Caption="大顺序号" VisibleIndex="4" width="5%" FieldName="OrderMax">
                                                  <HeaderStyle HorizontalAlign="Center" />
                                                  <CellStyle HorizontalAlign="Center"></CellStyle>
                                                </dxwgv:GridViewDataTextColumn> 
                                                  <dxwgv:GridViewDataTextColumn Caption="小顺序号" VisibleIndex="5" width="5%" FieldName="OrderSmall">
                                                  <HeaderStyle HorizontalAlign="Center" />
                                                  <CellStyle HorizontalAlign="Center"></CellStyle>
                                                </dxwgv:GridViewDataTextColumn> 
                                                 <dxwgv:GridViewDataTextColumn Caption="操作" VisibleIndex="6" width="4%">
                                                  <HeaderStyle HorizontalAlign="Center" />
                                                  <CellStyle HorizontalAlign="Center"></CellStyle>
                                                   <DataItemTemplate>
                                                   <nobr> 
                                                        <a id="lnbDel" runat="server">删除</a>  
                                                        </nobr>
                                                   </DataItemTemplate>
                                                </dxwgv:GridViewDataTextColumn>
                                            </Columns>
                                             <%-- 复选框选择脚本事件 --%>
                                                    <ClientSideEvents SelectionChanged="function(s,e){OnGridSelectionChanged();}" />
                                        </dxwgv:ASPxGridView>
                                    </td>
                                </tr>
                            </table>
    </ccit:ActionForm>
</body>
</html>
